from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from web import creature, explorer, user

app = FastAPI()

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],  # TODO: Change in production!
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

app.include_router(explorer.router)
app.include_router(creature.router)
app.include_router(user.router)


if __name__ == "__main__":
    import uvicorn

    uvicorn.run("main:app", reload=True)
